home *** CD-ROM | disk | FTP | other *** search
/ Gigarom 1 / Gigarom Macintosh Archives (Quantum Leap)(CDRM1080320)(1993).iso / FILES / HYP / E-G / GetPixel XFCN.cpt / GetPixel XFCN / card_2899.txt < prev    next >
Text File  |  1989-02-26  |  6KB  |  263 lines

  1. -- card: 2899 from stack: in
  2. -- bmap block id: 21679
  3. -- flags: 4000
  4. -- background id: 2630
  5. -- name: USA
  6.  
  7.  
  8. -- part 5 (button)
  9. -- low flags: 00
  10. -- high flags: 2004
  11. -- rect: left=50 top=48 right=90 bottom=95
  12. -- title width / last selected line: 0
  13. -- icon id / first selected line: 14767 / 14767
  14. -- text alignment: 1
  15. -- font id: 0
  16. -- text size: 12
  17. -- style flags: 0
  18. -- line height: 16
  19. -- part name: About
  20. ----- HyperTalk script -----
  21. on mouseUp
  22.   set lockscreen to true
  23.   set the scroll of card field "About" to 0
  24.   show card field "About"
  25.   show card field "About Title"
  26.   show card button "Hide About"
  27.   set lockscreen to false
  28. end mouseUp
  29.  
  30.  
  31.  
  32. -- part 2 (button)
  33. -- low flags: 00
  34. -- high flags: 2004
  35. -- rect: left=93 top=48 right=90 bottom=138
  36. -- title width / last selected line: 0
  37. -- icon id / first selected line: 20098 / 20098
  38. -- text alignment: 1
  39. -- font id: 0
  40. -- text size: 12
  41. -- style flags: 0
  42. -- line height: 16
  43. -- part name: Home
  44. ----- HyperTalk script -----
  45. on mouseUp
  46.   visual effect barn door close to black
  47.   visual effect barn door open to inverse
  48.   go home
  49. end mouseUp
  50.  
  51.  
  52.  
  53. -- part 3 (button)
  54. -- low flags: 00
  55. -- high flags: 2004
  56. -- rect: left=360 top=49 right=91 bottom=405
  57. -- title width / last selected line: 0
  58. -- icon id / first selected line: 13785 / 13785
  59. -- text alignment: 1
  60. -- font id: 0
  61. -- text size: 12
  62. -- style flags: 0
  63. -- line height: 16
  64. -- part name: Install
  65. ----- HyperTalk script -----
  66. on mouseUp
  67.   if the optionkey is down then pass mouseup
  68.   put installres(XCMD,GetPixel) into it
  69.   if it is empty then play boing
  70.   else answer it
  71. end mouseUp
  72.  
  73.  
  74.  
  75. -- part 4 (field)
  76. -- low flags: 80
  77. -- high flags: 2001
  78. -- rect: left=101 top=211 right=308 bottom=395
  79. -- title width / last selected line: 0
  80. -- icon id / first selected line: 0 / 0
  81. -- text alignment: 0
  82. -- font id: 3
  83. -- text size: 12
  84. -- style flags: 0
  85. -- line height: 18
  86. -- part name: In the Map
  87.  
  88.  
  89. -- part 6 (field)
  90. -- low flags: 80
  91. -- high flags: 2007
  92. -- rect: left=100 top=210 right=309 bottom=396
  93. -- title width / last selected line: 0
  94. -- icon id / first selected line: 0 / 0
  95. -- text alignment: 0
  96. -- font id: 3
  97. -- text size: 12
  98. -- style flags: 0
  99. -- line height: 16
  100. -- part name: About
  101.  
  102.  
  103. -- part 8 (field)
  104. -- low flags: 80
  105. -- high flags: 2001
  106. -- rect: left=101 top=211 right=230 bottom=379
  107. -- title width / last selected line: 0
  108. -- icon id / first selected line: 0 / 0
  109. -- text alignment: 1
  110. -- font id: 3
  111. -- text size: 14
  112. -- style flags: 256
  113. -- line height: 15
  114. -- part name: About Title
  115.  
  116.  
  117. -- part 7 (button)
  118. -- low flags: 80
  119. -- high flags: 0000
  120. -- rect: left=100 top=210 right=309 bottom=380
  121. -- title width / last selected line: 0
  122. -- icon id / first selected line: 0 / 0
  123. -- text alignment: 1
  124. -- font id: 0
  125. -- text size: 12
  126. -- style flags: 0
  127. -- line height: 16
  128. -- part name: Hide About
  129. ----- HyperTalk script -----
  130. on mouseUp
  131.   set lockscreen to true
  132.   hide card button "Hide About"
  133.   hide card field "About Title"
  134.   hide card field "About"
  135.   set lockscreen to false
  136. end mouseUp
  137.  
  138.  
  139.  
  140. -- part 9 (button)
  141. -- low flags: 00
  142. -- high flags: 2004
  143. -- rect: left=403 top=49 right=91 bottom=448
  144. -- title width / last selected line: 0
  145. -- icon id / first selected line: 6347 / 6347
  146. -- text alignment: 1
  147. -- font id: 0
  148. -- text size: 12
  149. -- style flags: 0
  150. -- line height: 16
  151. -- part name: Show Code
  152. ----- HyperTalk script -----
  153. on mouseUp
  154.   show card field code
  155.   show card button "Hide Code"
  156. end mouseUp
  157.  
  158.  
  159.  
  160. -- part 10 (field)
  161. -- low flags: 80
  162. -- high flags: 2007
  163. -- rect: left=17 top=27 right=326 bottom=495
  164. -- title width / last selected line: 0
  165. -- icon id / first selected line: 0 / 0
  166. -- text alignment: 0
  167. -- font id: 4
  168. -- text size: 9
  169. -- style flags: 0
  170. -- line height: 12
  171. -- part name: Code
  172.  
  173.  
  174. -- part 11 (button)
  175. -- low flags: 80
  176. -- high flags: 0000
  177. -- rect: left=17 top=27 right=326 bottom=479
  178. -- title width / last selected line: 0
  179. -- icon id / first selected line: 0 / 0
  180. -- text alignment: 1
  181. -- font id: 0
  182. -- text size: 12
  183. -- style flags: 0
  184. -- line height: 16
  185. -- part name: Hide Code
  186. ----- HyperTalk script -----
  187. on mouseUp
  188.   hide card field "Code"
  189.   hide card button "Hide Code"
  190. end mouseUp
  191.  
  192.  
  193.  
  194. -- part contents for card part 4
  195. ----- text -----
  196.  
  197. You must click the mouse in the black area of the map, on one of the states...
  198.  
  199. -- part contents for card part 6
  200. ----- text -----
  201.  
  202.  
  203.            ¬©1988 by Richard P. Davis 
  204.  
  205. This XFCN is sort of Shareware...  If you use it for something, please send me a copy of the stack you used it in, so I can see what is being done with it.  Either send it via the U.S. Snail, addressed to:
  206.  
  207.         Richard P. Davis
  208.         49 Showers Dr. #227J
  209.         Mountain View, Ca. 94040
  210.  
  211. Or post it on GENIE and send a message addressed to MJOLLNIR, telling me the name of the stack and a little bit about it.
  212.  
  213.    Please do NOT post this stack on CI$,
  214.      otherwise known as Compuserve...
  215.  
  216. If you frequent the MacInfo BBS in the San Francisco bay area, you can post your stack there instead of on GENIE, and send mail to RICHARD DAVIS there.
  217.  
  218.   <<Click here to return to explanation>>
  219.  
  220. -- part contents for card part 8
  221. ----- text -----
  222. GetPixel
  223.  
  224. -- part contents for card part 10
  225. ----- text -----
  226. /*
  227.     GetPixel -- a sample HyperCard user-defined command in C.
  228. */
  229.  
  230. #include <Types.h>
  231. #include <MemoryMgr.h>
  232. #include <OSUtil.h>
  233. #include <QuickDraw.h>
  234. #include "XCmd.h"
  235.  
  236. pascal void main(paramPtr)
  237.     XCmdBlockPtr    paramPtr;
  238. {
  239.     short   h, v;
  240.     Boolean x;
  241.     GrafPtr port;
  242.     Str31   str, res;
  243.  
  244.     /* First param is horizontal pos.  Convert it to a pascal string */
  245.     ZeroToPas(paramPtr,(char *)*(paramPtr->params[0]),(StringPtr)&str);
  246.     /* Convert the string to a number */
  247.     h = StrToNum(paramPtr,&str);
  248.  
  249.     /* Second param is vertical pos.  Convert it to a pascal string */
  250.     ZeroToPas(paramPtr,(char *)*(paramPtr->params[1]),(StringPtr)&str);
  251.     /* Convert the string to a number */
  252.     v = StrToNum(paramPtr,&str);
  253.  
  254.     /* Test the pixel passed to us */
  255.     x = GetPixel(h, v);
  256.     BoolToStr(paramPtr,x,(Str31 *)&res);
  257.     paramPtr->returnValue = PasToZero(paramPtr,(StringPtr)&res);
  258. }
  259.  
  260.  
  261. -- part contents for background part 3
  262. ----- text -----
  263. Illinois